/* 
	PROGRAM: Thanatos
	AUTHOR: Dwyer, Patrick; Easton, Sean; Roy, Bobby 
	FSU GARNET ID: pmd04; sde07; rcr05e
	COURSE INFORMATION: CNT5412
	Due Date: 04/19/2011
	
	SUMMARY 
		The definition of the Node class
*/

#include <vector>
#include <string>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <strings.h>
#include <cstring>
#include <cerrno>
#include <iostream>
//#include <boost/shared_prt.hpp>

#ifndef _NODE
#define _NODE

//using boost;
using std::vector;
using std::string;
using std::cerr;
using std::endl;
//using std::tr1::shared_prt;

class Node
{
    friend bool operator==(const Node& lhs, const Node& rhs);

    protected:
    string m_ipAddress;
    string m_portNum;
    struct sockaddr_in m_address;
    int m_socketDesc;
    vector<Node*> m_peers;

    public:
    Node();
    Node(string ip, string port);
    Node(struct sockaddr_in, vector<Node*>);
    Node(const Node&);
    ~Node();

    void SetIP(string ip);
    void SetPort(int p);
    
    virtual int Connect() = 0;
    virtual int Disconnect() = 0;
    virtual vector<Node*> GetPeers() = 0;
    
};

#endif // _NODE
